<%
var headerPart = {
%>
<script type="text/javascript">
    $(document).ready(function() {

    });
    function page(n,s){
        $("#pageNo").val(n);
        $("#pageSize").val(s);
        $("#searchForm").submit();
        return false;
    }
</script>
<% }; %>
<% layout("/layouts/micro.html",{headerSection:headerPart}){ %>
	 <div class="layui-tab layui-tab-brief childrenBody">
      <ul class="layui-tab-title">
         <li class="layui-this"><a href="${ctx}/gen/genScheme/">生成方案列表</a></li>
         <%if(shiro.hasPermission("gen:genScheme:edit")){%><li><a href="${ctx}/gen/genScheme/form">生成方案添加</a></li><%}%>
	</ul>
    <div class="layui-tab-content">
	<form id="searchForm" modelAttribute="genScheme" action="${ctx}/gen/genScheme/" method="post" class="layui-form">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>		
		<div class="layui-input-inline">
			<label class="layui-form-label">方案名称 ：</label>
			<div class="layui-input-inline">
				<input  type="text" name="name" htmlEscape="false" maxlength="200" class="layui-input"/>
			</div>
		</div>		
		<div class="layui-input-inline">
            <button  lay-filter="*"  class="layui-btn layui-btn-sm"  lay-submit>查询</button>
       	</div>
	</form>
	<#message content="${message!}"/>
	<table class="layui-table" >
		<thead>
		<tr><th>方案名称</th><th>生成模块</th><th>模块名</th><th>功能名</th><th>功能作者</th>
			<%if(shiro.hasPermission("gen:genScheme:edit")){%><th>操作</th><%}%>
		</tr>
		</thead>
		<tbody>
		<%for(genScheme in page.list){%>
			<tr>
				<td><a href="${ctx}/gen/genScheme/form?id=${genScheme.id}">${genScheme.name}</a></td>
				<td>${genScheme.packageName}</td>
				<td>${genScheme.moduleName}${isNotEmpty(genScheme.subModuleName)?'.':''}${genScheme.subModuleName}</td>
				<td>${genScheme.functionName}</td>
				<td>${genScheme.functionAuthor}</td>
				<%if(shiro.hasPermission("gen:genScheme:edit")){%>
				<td>
    				<a class="layui-btn layui-btn-xs" href="${ctx}/gen/genScheme/form?id=${genScheme.id}">修改</a>
					<a class="layui-btn layui-btn-xs layui-btn-danger" href="${ctx}/gen/genScheme/delete?id=${genScheme.id}" onclick="return confirmx('确认要删除该生成方案吗？', this.href)">删除</a>
				</td>
				<%}%>
			</tr>
		<%}%>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	</div>
	</div>
<%}%>